package com.weilai.domain;

import java.util.Date;

public class Messages {
    // 定义与表字段对应的私有属性
    private int id;
    private int senderId;
    private int receiverId;
    private String content;
    private Date createdAt;

    // 无参构造函数
    public Messages() {
    }

    // 有参构造函数
    public Messages(int id, int senderId, int receiverId, String content, Date createdAt) {
        this.id = id;
        this.senderId = senderId;
        this.receiverId = receiverId;
        this.content = content;
        this.createdAt = createdAt;
    }

    // id属性的getter方法
    public int getId() {
        return id;
    }
    // id属性的setter方法
    public void setId(int id) {
        this.id = id;
    }

    // senderId属性的getter方法
    public int getSenderId() {
        return senderId;
    }
    // senderId属性的setter方法
    public void setSenderId(int senderId) {
        this.senderId = senderId;
    }

    // receiverId属性的getter方法
    public int getReceiverId() {
        return receiverId;
    }
    // receiverId属性的setter方法
    public void setReceiverId(int receiverId) {
        this.receiverId = receiverId;
    }

    // content属性的getter方法
    public String getContent() {
        return content;
    }
    // content属性的setter方法
    public void setContent(String content) {
        this.content = content;
    }

    // createdAt属性的getter方法
    public Date getCreatedAt() {
        return createdAt;
    }
    // createdAt属性的setter方法
    public void setCreatedAt(Date createdAt) {
        this.createdAt = createdAt;
    }
}